import java.util.ArrayList;


public class DistanceTester
{

	public static void main(String[] args)
	{
		ArrayList<String> boardLines = new ArrayList<String>();
		boardLines.add("#######");
		boardLines.add("#@    #");
		boardLines.add("#  $$ #");
		boardLines.add("#     #");
		boardLines.add("#    .#");
		boardLines.add("#   . #");
		boardLines.add("#######");
		
		Board b = new Board(boardLines);
		System.out.println("Should be 3: "+ b.getDistances()[1][5]);
		System.out.println("Should be 5: "+ b.getDistances()[3][1]);
		System.out.println("Should be 1: "+ b.getDistances()[5][3]);
		System.out.println("Should be 1: "+ b.getDistances()[5][5]);
		
		Goal goal = b.getEmptyGoals().get(1);
		b.getEmptyGoals().remove(1);
		b.updateDistancesForRemoved(goal);
		
		System.out.println("-- remove one goal -- ");
		System.out.println("Should be 5: "+ b.getDistances()[1][5]);
		System.out.println("Should be 5: "+ b.getDistances()[3][1]);
		System.out.println("Should be 1: "+ b.getDistances()[5][3]);
		System.out.println("Should be 1: "+ b.getDistances()[5][5]);
		
		b.getEmptyGoals().add(goal);
		b.updateDistancesForNew(goal);
		System.out.println("-- add this goal again --");
		System.out.println("Should be 3: "+ b.getDistances()[1][5]);
		System.out.println("Should be 5: "+ b.getDistances()[3][1]);
		System.out.println("Should be 1: "+ b.getDistances()[5][3]);
		System.out.println("Should be 1: "+ b.getDistances()[5][5]);
	}
}
